package com.example.administrator.familfinalcialmanagement.ui.activity;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.example.administrator.familfinalcialmanagement.R;
import com.example.administrator.familfinalcialmanagement.databinding.ActivityTaskDescBinding;
import com.example.administrator.familfinalcialmanagement.ui.BaseActivity;
import com.example.administrator.familfinalcialmanagement.util.ToastUtil;
import com.example.administrator.familfinalcialmanagement.util.dialog.InCommonDialog;
import com.example.administrator.familfinalcialmanagement.util.listener.OnBHClickListener;

/**
 * Created by SensYang on 2019/03/28 22:10
 */

public class TaskDescActivity extends BaseActivity{

    ActivityTaskDescBinding binding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this,R.layout.activity_task_desc);
        binding.setActivity(this);
        initView();
    }

    private void initView() {
        setBack();
        setTitleText("任务详情");

        binding.tvModuleNext.setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.tvModuleNext:
                InCommonDialog dialog = new InCommonDialog(this);
                dialog.setTitleText("您确定要接这个任务？");
                dialog.show();
                dialog.setOnBHClickListener(new OnBHClickListener() {
                    @Override
                    public void onConfirmClick() {
                        ToastUtil.showToast("接单成功");
                    }

                    @Override
                    public void onCloseClick() {

                    }
                });
                break;
                default:
        }
    }
}
